package com.yisu.auction.manager.core.mapper;

import com.yisu.auction.ewf.entity.GoodsInfo;
import com.yisu.auction.manager.domain.request.baseInfoPackage.GoodsInfoRequest;
import com.yisu.auction.manager.domain.vo.baseInfoPackageVos.GoodsExpandInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(GoodsInfo record);

    int insertSelective(GoodsInfo record);

    GoodsInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(GoodsInfo record);

    int updateByPrimaryKeyWithBLOBs(GoodsInfo record);

    int updateByPrimaryKey(GoodsInfo record);

    /**
     * author:赵杰
     * Business Description : 分页获取商品信息
     * @param goodsInfoRequest 分页请求信息
     * @return 商品分类列表
     */
    List<GoodsExpandInfoVo> getGoodsInfoByPage(GoodsInfoRequest goodsInfoRequest);

    /**
     * author:赵杰
     * Business Description : 通过商品Id获取改商品最大期号
     * @param goodsId 商品ID
     * @return
     */
    int getMaxTermByGoodsId(@Param("goodsId")long goodsId);

    /**
     * author:赵杰
     * Business Description : 获取商品最大排序
     * @return
     */
    int getMaxSort();


    /**
     * author:赵杰
     * Business Description : 通过商品名称获取商品信息
     * @param goodsName 商品名称
     * @return
     */
    List<GoodsInfo> getGoodsInfoByGoodsName(@Param("goodsName") String goodsName);

    /**
     * author:赵杰
     * Business Description : 获取所有商品信息
     * @return
     */
    List<GoodsInfo> getAllGoodsInfo();


    /**
     * author:赵杰
     * Business Description : 获取正在售卖的商品列表
     * @return
     */
    List<GoodsInfo>getGoodsForShowing();

    /**
     * author:赵杰
     * Business Description : 获取正在售卖的商品列表
     * @return
     */
    List<GoodsInfo>getGoodsForAll();
}